package demo014;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        String re="spring_demo1.xml";
        ClassPathXmlApplicationContext c = new ClassPathXmlApplicationContext(re);
        Pp bean = c.getBean(Pp.class);
       // bean.Go();

        ApplicationContext a = new AnnotationConfigApplicationContext(spring010.class);
        User1 bean1 = a.getBean(User1.class);
        bean1.say();

        User2 bean2 = a.getBean(User2.class);
        bean2.set();


    }
}
